home *** CD-ROM | disk | FTP | other *** search
- 129
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- CopyFileProgress
- --- RECORDSEPARATOR ---
- Platform:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Windows and Macintosh
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Description:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- baCopyFileProgress copies a file, while displaying a progress dialog
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Usage:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Result = baCopyFileProgress( SourceFile , DestFile , Overwrite, Title, ButtonText,
- --- RECORDSEPARATOR ---
- Flags )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Arguments:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- String, string, string, string, string, integer.
- --- RECORDSEPARATOR ---
- SourceFile is the file to copy.
- --- RECORDSEPARATOR ---
- DestFile is the name to copy it to.
- --- RECORDSEPARATOR ---
- Overwrite determines how the copy is done. Can be:
- --- RECORDSEPARATOR ---
- "Always"
- --- RECORDSEPARATOR ---
- always copie
- --- RECORDSEPARATOR ---
- s the file
- --- RECORDSEPARATOR ---
- "IfNewer"
- --- RECORDSEPARATOR ---
- copies the file if SourceFile is newer than DestFile
- --- RECORDSEPARATOR ---
- "IfNotExist"
- --- RECORDSEPARATOR ---
- copies only if DestFile does not already exist
- --- RECORDSEPARATOR ---
- Title is the title of the dialog box.
- --- RECORDSEPARATOR ---
- ButtonText is the text to use in the Cancel button.
- --- RECORDSEPARATOR ---
- Flags changes the behaviour of the dialog, see notes for details.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Returns:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Integer.
- --- RECORDSEPARATOR ---
- Returns 0 if the file was copied successfully, otherwise one of these:
- --- RECORDSEPARATOR ---
- 1
- --- RECORDSEPARATOR ---
- Invalid Source file name
- --- RECORDSEPARATOR ---
- 2
- --- RECORDSEPARATOR ---
- Invalid Dest file name
- --- RECORDSEPARATOR ---
- 3
- --- RECORDSEPARATOR ---
- Error reading the Source file
- --- RECORDSEPARATOR ---
- 4
- --- RECORDSEPARATOR ---
- Error writing the Dest file
- --- RECORDSEPARATOR ---
- 5
- --- RECORDSEPARATOR ---
- Couldn't create directory for Dest file
- --- RECORDSEPARATOR ---
- 6
- --- RECORDSEPARATOR ---
- Dest file exists
- --- RECORDSEPARATOR ---
- 7
- --- RECORDSEPARATOR ---
- Dest file is newer that Source file
- --- RECORDSEPARATOR ---
- 9
- --- RECORDSEPARATOR ---
- User cancelled the copy
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Examples:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Director:
- --- RECORDSEPARATOR ---
- OK = baCopyFileProgress( "c:\data\student.dat" , "c:\data\backup\student.dat" ,
- --- RECORDSEPARATOR ---
- "If
- --- RECORDSEPARATOR ---
- Newer", "Backing up files... ", "Cancel", 0 )
- --- RECORDSEPARATOR ---
- Authorware:
- --- RECORDSEPARATOR ---
- OK := baCopyFileProgress( "c:\\data\\student.dat" , "c:\\data\\backup\\student.dat" ,
- --- RECORDSEPARATOR ---
- "IfNewer" , "Backing up files... ", "Cancel", 0 )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Notes:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- By default, this function will not overwrite an existing file if that file is marked as
- --- RECORDSEPARATOR ---
- read-only. However, on Windows, by adding
- --- RECORDSEPARATOR ---
- "
- --- RECORDSEPARATOR ---
- +
- --- RECORDSEPARATOR ---
- "
- --- RECORDSEPARATOR ---
- to the
- --- RECORDSEPARATOR ---
- "
- --- RECORDSEPARATOR ---
- Always
- --- RECORDSEPARATOR ---
- "
- --- RECORDSEPARATOR ---
- and
- --- RECORDSEPARATOR ---
- "
- --- RECORDSEPARATOR ---
- IfNewer
- --- RECORDSEPARATOR ---
- "
- --- RECORDSEPARATOR ---
- options (eg "Always+" or "IfNewer+"), the destination f
- --- RECORDSEPARATOR ---
- iles will be overwritten if they
- --- RECORDSEPARATOR ---
- are read-only.
- --- RECORDSEPARATOR ---
- A return value of 6 (Dest file exists) can only be returned when Overwrite is
- --- RECORDSEPARATOR ---
- "IfNotExist".
- --- RECORDSEPARATOR ---
- A return value of 7 (Dest file is newer than Source file) can only be returned when
- --- RECORDSEPARATOR ---
- Overwrite is "IfNewer". The other return values can be returned for all Overwrite
- --- RECORDSEPARATOR ---
- options.
- --- RECORDSEPARATOR ---
- The "IfNewer" option operates as follows: if both files have internal version
- --- RECORDSEPARATOR ---
- numbers, then these numbers are used for comparison, otherwise the dates of the
- --- RECORDSEPARATOR ---
- two files are used for comparison.
- --- RECORDSEPARATOR ---
- The DestFile must contain the full name of the file, not just the name of the folder it
- --- RECORDSEPARATOR ---
- is being copied to.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- (continued next page)